﻿
Imports Moca.Db

Namespace Db.Impl

	''' <summary>
	''' DaoSelect データアクセス
	''' </summary>
	''' <remarks></remarks>
	Public Class DaoSelect
		Inherits AbstractDao
		Implements IDaoSelect

		Public Function ExecuteTest() As System.Collections.Generic.IList(Of tbDemoEntity) Implements IDaoSelect.ExecuteTest
			Const C_SQL As String = "SELECT * FROM tbDemoEntities"

			Using cmd As IDbCommandSelect = CreateCommandSelect(C_SQL)
				Return cmd.Execute(Of tbDemoEntity)()
			End Using
		End Function

		Public Function ExecuteScalarTest() As Object Implements IDaoSelect.ExecuteScalarTest
			Const C_SQL As String = "SELECT COUNT(*) FROM tbDemoEntities"

			Using cmd As IDbCommandSelect = CreateCommandSelect(C_SQL)
				Return cmd.ExecuteScalar
			End Using
		End Function

	End Class

End Namespace
